<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>家居建材分会场</title>
    <link rel="stylesheet" href="../../css/model.css">
    <link rel="stylesheet" href="../style/son-jiajujc/style.css">
</head>

<body>
    <div class="header"></div>
        <div class="body">
            <div class="title"></div>
            <div class="model-1">
                <div class="titl-1"></div>
                <div class="j-top clearfix">
                    <a href="http://www.cjwsc.com/item/128758.html" target="_blank" class="fl"><img src="../images/home-carnival1016/son-jiajujc/pc/t1.png" alt=""></a>
                    <a href="http://www.cjwsc.com/item/142779.html" target="_blank" class="fr"><img src="../images/home-carnival1016/son-jiajujc/pc/t2.png" alt=""></a>
                </div>
                <div class="container clearfix">
                </div>
            </div>
            <div class="model-2">
                <div class="title-2">
                    <div></div>
                </div>
                <div class="wrap">
                    <a href="http://www.cjwsc.com/item/129666.html" target="_blank"><img src="../images/home-carnival1016/son-jiajujc/pc/1.png" alt=""></a>
                    <a href="http://www.cjwsc.com/item/118132.html" target="_blank"><img src="../images/home-carnival1016/son-jiajujc/pc/2.png" alt=""></a>
                    <a href="http://www.cjwsc.com/item/143958.html" target="_blank"><img src="../images/home-carnival1016/son-jiajujc/pc/3.png" alt=""></a>
                </div>
            </div>
            <div class="model-3">
                <div class="title-3">
                    <div></div>
                </div>
                <div class="wrap">
                    <ul class="nav">
                        <li class="cur">客厅</li>
                        <li>卧室</li>
                        <li>餐厅</li>
                    </ul>
                    <div class="nav-container ">
                        <div class="container clearfix"></div>
                        <div class="container clearfix"></div>
                        <div class="container clearfix"></div>
                    </div>
                </div>
            </div>
            <div class="model-4">
                <div class="title-4"><div></div></div>
                <div class="wrap clearfix">
                    <ul class="fl">
                        <li><a href="http://www.cjwsc.com/lists/4163-150317-0.html" target="_blank"><img src="../images/home-carnival1016/son-jiajujc/pc/l1.png" alt=""></a></li>
                        <li><a href="http://www.cjwsc.com/lists/4101-150311-0.html" target="_blank"><img src="../images/home-carnival1016/son-jiajujc/pc/l2.png" alt=""></a></li>
                        <li><a href="http://www.cjwsc.com/lists/4005-150303-0.html" target="_blank"><img src="../images/home-carnival1016/son-jiajujc/pc/l3.png" alt=""></a></li>
                        <li><a href="http://www.cjwsc.com/lists/3278-150310-0.html" target="_blank"><img src="../images/home-carnival1016/son-jiajujc/pc/l4.png" alt=""></a></li>
                        <li><a href="http://www.cjwsc.com/lists/3957-150102-0.html" target="_blank"><img src="../images/home-carnival1016/son-jiajujc/pc/l5.png" alt=""></a></li>
                        <li><a href="http://www.cjwsc.com/lists/3628-150103-0.html" target="_blank"><img src="../images/home-carnival1016/son-jiajujc/pc/l6.png" alt=""></a></li>
                    </ul>
                    <div class="container fr clearfix"></div>                    
                </div>
            </div>
            <div class="bottom-top">
                <div class="back-top"></div>
            </div>
        </div>
    <div class="footer"></div>
    <!-- template -->
    <script type="text/html" id="card-tpl">
        <img src="{{pic}}" alt="">
        <div>
            <p>{{name}}</p>
            <div>
                <p>活动价:￥<span>{{discountPrice}}</span>&nbsp;&nbsp;<i>原售价:￥<span>{{price_on_tag}}</span></i></p>
            </div>
            <i>立即抢购</i>
        </div>
    </script>
    <script type="text/html" id="ctx-tpl">
        {{each $data}}
            <a class="card fl" target='_blank'></a>
        {{/each}}
    </script>
</body>
<script type="text/javascript" src="../../js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="../../js/art-template.js"></script>
<script src="../../js/login.js"></script>
<script src="../../js/model.js"></script>







<script>
    // init start
    var WWW_URL = 'http://www.cjwsc.com';
    $(".header").topBox();
    $(".footer").footBox();
    // init end

    (function ($, template) {
        var info = [
            [129666,118132,143958],
            [130341,118118,118118,130654,108016,108016],
            [118074,112861,117503],
            [113111,118618,108073],
            [139238,139286,139729,136743,136753,137995,130440,130449,130454,102427,110141,110885,129694,129716,126632,113524,113535,113597]
        ]

        function getData(id, idx, index) {
            $.ajax({
                url: 'http://www.cjwsc.com/qcwdProduct/getProductByIds',
                data: {
                    ids: id,
                    business_type: 10,
                    client_type: 1
                },
                dataType: "jsonp",
                jsonp: 'jsonpcallback',
                success: function (res) {
                    var href = 'http://www.cjwsc.com/item/' + id + '.html';
                    res.msg[0].index = idx + 1;
                    res.msg[0].pic = res.msg[0].pic.replace('240_240', '800_800')
                    var element = index ? $('.container').eq(index).find('.card').eq(idx) : $('.card').eq(idx);
                    element.html(template('card-tpl', res.msg[0])).attr('href', href);
                    if (res.msg[0].stock_num == 0 || res.msg[0].status == 2) element.addClass('masker')
                        .removeAttr('href');
                }
            })
        }

        function setData(info){
            for(var i=0,len=info.length;i<len;i++){
                $('.container').eq(i).html(template('ctx-tpl',info[i]))
                for(var j=0,leng=info[i].length;j<leng;j++){
                    getData(info[i][j],j,i)
                }
            }
            $('.container').eq(0).find('.card').addClass('cur')
        }
        setData(info)

        $('.nav').on('click','li',function(){
            var $this = $(this);
            $this.addClass('cur').siblings().removeClass('cur')
            $('.nav-container .container').eq($this.index()).fadeIn().siblings().fadeOut()
        })

        

        $('.back-top').on('click', function () {
            $('html,body').animate({
                scrollTop: 0
            }, 500)
        })
    })($, template)
</script>

</html> 
